//
// Created by francklinson on 2021/11/18 AT 9:51.
// May Saint Diana bless you!
//

#include <iostream>


using namespace std;

class Solution {
public:
    int totalMoney(int n) {
        int weekNums = n / 7;
        int leftDays = n % 7;
        int ans = 0;
        // 完整的周
        for (int i = 1; i <= weekNums; ++i) {
            ans += 7 * (i + 3);
        }
        // 剩下的几天
        ans += (2 * weekNums + 1 + leftDays) * leftDays / 2;
        return ans;
    }
};

int main() {
    Solution solution;
    int n = 0;
    cin>> n;
    cout << solution.totalMoney(n) << endl;
    return 0;
}

